﻿@model BlackBird.Models.BiJiaDanTableDM
@using BlackBird.Resources

 <div id = "bijiadan_table">
     <table class="width_full">
        <!-- 表头-->
        <tr>
            <td class="xuhao" rowspan="2"><span>序 号</span></td>
            <td class="name" rowspan="2"><span>商品名</span></td>
            <td class="guige" rowspan="2"><span>规格及型号</span></td>
            <td class="count" rowspan="2"><span>数 量</span></td>
            <td class="unit" rowspan="2"><span>单 位</span></td>

            @for (int index = 0; index < Model.Companies.Count; index++)
            {
                <td class="company companyName" data-supplierindex="@index" colspan="2">
                    @Html.TextAreaFor(v => v.Companies[index].Name, new { @class = "fulldisplay noborder", @rows = "1" })
                    @Html.HiddenFor(v => v.Companies[index].Id)
                </td>
            }

            <!-- 参考供应商 -->
            <td class="company companyName">@Html.TextAreaFor(v => v.ReferenceCompany.Name, new { @class = "fulldisplay noborder", @rows = "1" })</td>
        </tr>
        <tr>
            @for (int index = 0; index < Model.Companies.Count; index++)
            {
            <td class="baojia_title">@(BBStrings.BaoJia)</td>
            <td class="shenhejia_title">@BBStrings.ShenHeJia</td>
            }

            <td class="pricehead">参考价格(元)</td>
        </tr>

        <!-- 产品主体表格-->
        @for (int index = 0; index < Model.ProductRows.Count; index++)
        {
            @Html.EditorFor(v => v.ProductRows[index])
        }

        <!-- 合计，联系方式部分-->
        <tr>
            <td class="longcloumn" colspan="5"><span>合计：</span></td>
            @for (int index = 0; index < Model.Companies.Count; index++)
            {
                <td>
                <textarea class="price baojia total fulldisplay noborder" data-supplierindex="@index" readonly="readonly"></textarea>
                </td>
                <td>
                <textarea class="price shenhejia total fulldisplay noborder" data-supplierindex="@index" readonly="readonly"></textarea>
                </td>
            }

            <td><textarea class="price baojia total fulldisplay noborder" readonly="readonly"></textarea></td>
        </tr>
        <tr class="Contacter">
            <td class="longcloumn" colspan="5"><span>联系人：</span></td>
            @for (int index = 0; index < Model.Companies.Count; index++)
            {
                <td class="contactcolumn" data-supplierindex="@index" colspan="2">
                    @Html.TextAreaFor(v => v.Companies[index].ContactorInfo.RealName, new { @class = "fulldisplay noborder", @rows = "1" })
                </td>
            }

            <td>
                @Html.TextAreaFor(v => v.ReferenceCompany.ContactorInfo.RealName, new { @class = "fulldisplay noborder", @rows = "1" })
            </td>
        </tr>
        <tr class="CallNumber">
            <td class="longcloumn" colspan="5"><span>电话：</span></td>
                
            @for (int index = 0; index < Model.Companies.Count; index++)
            {
                <td class="contactcolumn" data-supplierindex="@index" colspan="2">
                    @Html.TextAreaFor(v => v.Companies[index].ContactorInfo.Tel, new { @class = "fulldisplay noborder", @rows = "1" })
                </td>
            }

            <td>
                @Html.TextAreaFor(v => v.ReferenceCompany.ContactorInfo.Tel, new { @class = "fulldisplay noborder", @rows = "1" })
            </td>
        </tr>

        </table>
  </div>
